Optimal. Leaf size=42 \[ \frac {(2 a-b) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {b \tan (c+d x) \sec (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3676, 385, 206} \[ \frac {(2 a-b) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {b \tan (c+d x) \sec (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 385
Rule 3676
Rubi steps
\begin {align*} \int \sec (c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {a-(a-b) x^2}{\left (1-x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {b \sec (c+d x) \tan (c+d x)}{2 d}+\frac {(2 a-b) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{2 d}\\ &=\frac {(2 a-b) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {b \sec (c+d x) \tan (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 48, normalized size = 1.14 \[ \frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {b \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {b \tan (c+d x) \sec (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 76, normalized size = 1.81 \[ \frac {{\left (2 \, a - b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a - b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, b \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.39, size = 64, normalized size = 1.52 \[ \frac {{\left (2 \, a - b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - {\left (2 \, a - b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, b \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.29, size = 75, normalized size = 1.79 \[ \frac {b \left (\sin ^{3}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {b \sin \left (d x +c \right )}{2 d}-\frac {b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.10, size = 62, normalized size = 1.48 \[ \frac {{\left (2 \, a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a - b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, b \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.29, size = 79, normalized size = 1.88 \[ \frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a-b\right )}{d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________